package top.atluofu.luofuecommerce.thirdyparty.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import top.atluofu.common.utils.R;
import top.atluofu.luofuecommerce.thirdyparty.component.SmsComponent;

/**
 * @ClassName: SmsSendController
 * @description: TODO
 * @author: 有罗敷的马同学
 * @datetime: 2022Year-11Month-24Day-11:11
 * @Version: 1.0
 */
@RestController
@RequestMapping("/sms")
public class SmsSendController {

    @Autowired
    SmsComponent smsComponent;


    @GetMapping
    public R sendCode(@RequestParam("phone") String phone, @RequestParam("code") String code) {
        smsComponent.sendSmsCode(phone, code);
        return R.ok();
    }
}
